using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel.DataAnnotations;

namespace BattleTech.Models
{
	public class AmmoDefinition : EquipmentDefinition
	{
		public AmmoDefinition(string name, int shots)
		{
			Name = name;
			Size = 1;
			Weight = 1;
			QuantityIncrement = 0.5M;
			Shots = shots;
		}

		[Required()]
		public string AppliesTo
		{
			get { return Get<string>(Name, "AppliesTo"); }
		}

		/// <summary>
		/// Shots are always expressed in terms of shots per ton.
		/// </summary>
		public int Shots
		{
			get { return Get<int>("Shots"); }
			private set { Set(value, "Shots"); }
		}
	}
}
